import request from "@/utils/request.js";
import baseUrl from "@/utils/version.js";

export function delete_post(id) {
    return request.delete(baseUrl.system.v1 + `/post/${id}`);
}

export function update_post(id, data) {
    return request.put(baseUrl.system.v1 + `/post/${id}`, data);
}

export function status_post(id) {
    return request.put(baseUrl.system.v1 + `/post/status/${id}`);
}

export function get_post(id) {
    return request.get(baseUrl.system.v1 + `/post/${id}`);
}

export function list_post(page, pageSize) {
    return request.get(baseUrl.system.v1 + `/post?page=${page}&pageSize=${pageSize}`);
}